import request from '@/utils/request'

export function fetchDictList(typeCode) {
	return request({
		url: '/admin/dict/list',
		method: 'get',
		params: {
			typeCode: typeCode
		}
	})
}

export function fetchPage(query) {
	return request({
		url: '/admin/dict/getPage',
		method: 'get',
		params: query
	})
}

export function del(id) {
	return request({
		url: '/admin/dict/del/' + id,
		method: 'delete'
	})
}


export function add(data) {
	return request({
		url: '/admin/dict/save',
		method: 'post',
		data
	})
}

export function update(data) {
	return request({
		url: '/admin/dict/save',
		method: 'post',
		data
	})
}